<template>
  <div class="dialog-body" :model="groupLevelInfo">
      <div>
          <div class="dia-level">付费等级</div>
          <div class="dia-level">
              <el-checkbox-group v-model="levelCheckList">
                <el-checkbox :label="item.levelName" v-for="(item, key) in this.payLevel" :key="key"></el-checkbox>
              </el-checkbox-group>
          </div>
      </div>
      <div>
          <div class="dia-level">免费等级</div>
          <div class="dia-level">
             <el-checkbox :label= "item.levelName" v-for="(item, key) in this.freeLevel" :key="key"></el-checkbox>
          </div>
     </div>
  </div>
</template>

<script>

import {
  listLevel
} from "@/api/customer/level";
export default {
  props: ["groupLevelInfo"],
  components:{

  },
  data() {
    return {
      levelCheckList:[],
      levelInfo:[],
      payLevel:[],
      freeLevel:[]
    }
  },
  created() {
     listLevel().then(response => {
        response.rows.forEach(item => {
           if( item.customerPattern == '1'){
             this.payLevel.push(item);
           }
           if( item.customerPattern == '0'){
             this.freeLevel.push(item);
           }
        });

     });
  },
  methods: {
  },
};
</script>

<style scoped>
  .el-form-item {
    margin-bottom: 0;
  }
  .dia-level {
    float: left;
    margin-top: 5px;
    margin-left: 50px;
  }
</style>
